import 'package:yd_eval/generated/json/base/json_field.dart';
import 'package:yd_eval/generated/json/yd_api_eval_result_entity.g.dart';
import 'dart:convert';
export 'package:yd_eval/generated/json/yd_api_eval_result_entity.g.dart';

@JsonSerializable()
class YdApiEvalResultEntity {
	YdApiEvalResultResult? result;
	String? requestId;
	String? errorCode;
	String? action;

	YdApiEvalResultEntity();

	factory YdApiEvalResultEntity.fromJson(Map<String, dynamic> json) => $YdApiEvalResultEntityFromJson(json);

	Map<String, dynamic> toJson() => $YdApiEvalResultEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class YdApiEvalResultResult {
	String? refText;
	double? pronunciation;
	double? start;
	List<YdApiEvalResultResultWords>? words;
	double? fluency;
	double? speed;
	double? integrity;
	String? service;
	double? overall;
	double? end;
	bool? isFinal;
	String? status;

	YdApiEvalResultResult();

	factory YdApiEvalResultResult.fromJson(Map<String, dynamic> json) => $YdApiEvalResultResultFromJson(json);

	Map<String, dynamic> toJson() => $YdApiEvalResultResultToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class YdApiEvalResultResultWords {
	double? pronunciation;
	double? start;
	int? index;
	double? end;
	String? word;
	List<YdApiEvalResultResultWordsPhonemes>? phonemes;

	YdApiEvalResultResultWords();

	factory YdApiEvalResultResultWords.fromJson(Map<String, dynamic> json) => $YdApiEvalResultResultWordsFromJson(json);

	Map<String, dynamic> toJson() => $YdApiEvalResultResultWordsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class YdApiEvalResultResultWordsPhonemes {
	bool? stressDetect;
	double? pronunciation;
	String? phoneme;
	double? start;
	double? end;
	bool? judge;
	String? calibration;
	double? prominence;
	bool? stressRef;

	YdApiEvalResultResultWordsPhonemes();

	factory YdApiEvalResultResultWordsPhonemes.fromJson(Map<String, dynamic> json) => $YdApiEvalResultResultWordsPhonemesFromJson(json);

	Map<String, dynamic> toJson() => $YdApiEvalResultResultWordsPhonemesToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}